package com.lljjcoder.citypickerview.model;

import android.os.Parcel;
import android.os.Parcelable;

public class DistrictModel implements Parcelable {
	private String name;
	private String zipcode;
	
	public DistrictModel() {
		super();
	}

	public DistrictModel(String name, String zipcode) {
		super();
		this.name = name;
		this.zipcode = zipcode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getZipcode() {
		return zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	@Override
	public String toString() {
		return "DistrictModel [name=" + name + ", zipcode=" + zipcode + "]";
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.name);
		dest.writeString(this.zipcode);
	}

	protected DistrictModel(Parcel in) {
		this.name = in.readString();
		this.zipcode = in.readString();
	}

	public static final Parcelable.Creator<DistrictModel> CREATOR = new Parcelable.Creator<DistrictModel>() {
		@Override
		public DistrictModel createFromParcel(Parcel source) {
			return new DistrictModel(source);
		}

		@Override
		public DistrictModel[] newArray(int size) {
			return new DistrictModel[size];
		}
	};
}
